package tehMod;

import net.minecraft.src.*;

public class ModelBanner extends ModelBase
{
  //fields
    ModelRenderer handle;
    ModelRenderer flag;
  
	 public ModelBanner() {
		 textureWidth = 32;
		 textureHeight = 64;
		 
	     handle = new ModelRenderer(this, 0, 0);
	     handle.mirror = true;
	     handle.addBox(0F, 0F, 0F, 1, 30, 1);
	     handle.setRotationPoint(0F, -6F, 0F);
	     handle.setTextureSize(32, 64);
	     setRotation(handle, 0F, 0F, 0F);
	     
	     flag = new ModelRenderer(this, 4, 0);
	     flag.addBox(0F, 0F, 0F, 10, 15, 1);
	     flag.setRotationPoint(-10F, -5F, 0F);
	     flag.setTextureSize(32, 64);
	     flag.mirror = true;
	     setRotation(flag, 0F, 0F, 0F);
	 }
  
  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5);
    handle.render(f5);
    flag.render(f5);
  }
  
	public void renderModel(float f5){
		handle.render(f5);
		flag.render(f5);
	}

  
  private void setRotation(ModelRenderer model, float x, float y, float z)
  {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
  }
  
  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
  {
    super.setRotationAngles(f, f1, f2, f3, f4, f5);
  }

}
